import React, { Suspense } from 'react';
import { useRoutes } from "react-router-dom"
import routes from './router/Index';
import RouterBeforeEach from './router/RouterBerforeEach'
import Loading from './component/Loading/Loading';
import './App.css';

function App() {
  return (
    <div className="App">
      <Suspense fallback={<Loading/>}>
        {
          useRoutes(routes)
        }
      </Suspense>
      <RouterBeforeEach/>
    </div>
  );
}

export default App;
